package com.jemmyee.pizza.service;

import java.io.Serializable;
import java.util.List;

import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.hibernate.criterion.DetachedCriteria;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.jemmyee.core.dao.Page;
import com.jemmyee.pizza.dao.ICaiDetailDao;
import com.jemmyee.pizza.entity.CaiDetail;

@Service("caiDetailService")
public class CaiDetailServiceImpl implements ICaiDetailService<CaiDetail> {
	
	private static final Log log = LogFactory.getLog(CaiDetailServiceImpl.class);

	@Autowired
	private ICaiDetailDao caiDetailDao;


	public void delete(CaiDetail entity) {
		caiDetailDao.delete(entity);
	}

	public void deleteById(Serializable id) {
		caiDetailDao.deleteById(id);
	}

	public CaiDetail findById(Serializable id) {
		return caiDetailDao.findById(id);
	}

	public void save(CaiDetail entity) {
		caiDetailDao.save(entity);
	}

	public void update(CaiDetail entity) {
		caiDetailDao.update(entity);
	}

	public List<CaiDetail> findAll(CaiDetail entity) {
		return caiDetailDao.findAll(entity);
	}

	public Page findPageByCriteria(DetachedCriteria detachedCriteria,
			int pageSize, int startIndex,String order) {
		return caiDetailDao.findPageByCriteria(detachedCriteria, pageSize, startIndex, order);
	}

	public List<CaiDetail> findByProperty(String propertyName,
			Object value) {
		return caiDetailDao.findByProperty(new CaiDetail(), propertyName, value);
	}

	public List<CaiDetail> findAll() {
		return caiDetailDao.findAll(new CaiDetail());
	}

	public List<CaiDetail> findByCriteria(DetachedCriteria criteria) {
		return caiDetailDao.findByCriteria(criteria);
	}

	public void deleteAll(List<CaiDetail> list) {
		// TODO Auto-generated method stub
		
	}
}
